package com.inspur.dgov.bsp.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.inspur.dgov.bsp.user.entity.PubRegionRelation;

/**
 * 区划关系 服务类
 *
 * @author chiyupei
 * @version 1.0
 * @since 1.0
 */
public interface PubRegionRelationService extends IService<PubRegionRelation> {

    /**
     * 递归添加区划关系
     * @param relation
     * @return
     */
    boolean insertRecursionRegionRelation(PubRegionRelation relation);

    /**
     * 分离子树,删除子树节点与其祖先的关系
     * @param relation
     */
    boolean separateRegionRelation(PubRegionRelation relation);

    /**
     * 移动子树，用笛卡尔积嫁接
     * @param relation
     */
    boolean moveRegionRelation(PubRegionRelation relation);
}
